package com.tdr.myandroid.model;

/**
 * Created by Administrator on 2014/7/16.
 */
public abstract class ConditionObject {

    public final static int CONDITION_TYPE_SMS =   0;
    private int id = 0;
    private String condition = null;

    public static ConditionObject createCondition(int conditionType, int id) {
        ConditionObject createCondition = null;

        switch (conditionType) {
            case CONDITION_TYPE_SMS:
                createCondition = new ConditionSms(id);
                break;
            default:
                createCondition = null;
        }

        return createCondition;
    }

    public abstract boolean isConditionReached(String inputCondition);
    public abstract int getType();

    public ConditionObject(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }
    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

}
